package hngc.com;

import java.util.Scanner;

public class Box5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = 0;
        int b = 0;
        System.out.println("请输入a的值");
        while (scanner.hasNext()) {
            try {
                a = scanner.nextInt();
                System.out.println("请输入b的值");
                b = scanner.nextInt();
                break;
            } catch (Exception e) {
                System.out.println("输入不符合要求");
                return;
            }
        }
        if (a > 5 && b > 10) {
            double x = Math.pow(a, 2) * b;
            System.out.println("x=" + x);
        } else {
            if (b == 0 && a > 0) {
                double y = Math.sqrt(a);
                System.out.println("y=" + y);
            } else {
                double z = Math.pow((a + b), 5);
                System.out.println("z=" + z);
            }
        }
        scanner.close();
    }
}
